<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/produceinfo/q_produce_notarize_lypjmx/q_produce_notarize_lypjmx.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/produceinfo/q_produce_notarize_lypjmx/q_produce_notarize_lypjmx.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: '单号',
                footer: "Foots",
                cnName: '生产确认单产品配件明细',
                name: 'q_produce_notarize_lypjmx/q_produce_notarize_lypjmx',
                url: "/q_produce_notarize_lypjmx/",
                sortName: "单号"
            });
            const editFormFields = ref({});
            const editFormOptions = ref([]);
            const searchFormFields = ref({"单号":"","产品编码":"","产品名称":"","领用单号":"","审核状态":"","日期":""});
            const searchFormOptions = ref([[{"title":"确认单单号","field":"单号","type":"like"},{"title":"产品编码","field":"产品编码","type":"like"},{"title":"产品名称","field":"产品名称","type":"like"}],[{"title":"领用单号","field":"领用单号","type":"like"},{"dataKey":"audit","data":[],"title":"审核状态","field":"审核状态","type":"select"},{"title":"日期","field":"日期","type":"datetime"}]]);
            const columns = ref([{field:'单号',title:'确认单单号',type:'string',width:200,require:true,align:'left',sort:true},
                       {field:'生产人',title:'生产人',type:'string',width:80,hidden:true,align:'left'},
                       {field:'产品编码',title:'产品编码',type:'string',width:80,align:'left'},
                       {field:'产品名称',title:'产品名称',type:'string',width:220,align:'left'},
                       {field:'产品数量',title:'产品数量',type:'float',width:80,align:'left'},
                       {field:'产品成本',title:'产品成本',type:'decimal',width:100,hidden:true,align:'left'},
                       {field:'产品金额',title:'产品金额',type:'decimal',width:100,align:'left'},
                       {field:'产品无税成本',title:'产品无税成本',type:'decimal',width:100,hidden:true,align:'left'},
                       {field:'产品无税金额',title:'产品无税金额',type:'decimal',width:100,align:'left'},
                       {field:'领用单号',title:'领用单号',type:'string',width:200,align:'left'},
                       {field:'配件编码',title:'配件编码',type:'string',width:80,align:'left'},
                       {field:'配件名称',title:'配件名称',type:'string',width:220,align:'left'},
                       {field:'配件数量',title:'配件数量',type:'float',width:100,align:'left'},
                       {field:'配件金额',title:'配件金额',type:'float',width:100,align:'left'},
                       {field:'配件无税金额',title:'配件无税金额',type:'float',width:100,align:'left'},
                       {field:'审核状态',title:'审核状态',type:'int',bind:{ key:'audit',data:[]},width:80,align:'left'},
                       {field:'日期',title:'日期',type:'datetime',width:200,align:'left',sort:true}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
